/**
 * file
 */
package com.tdkj.model.financial;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * 
 * FileName: BeanChanging.java
 * 
 * @Description: TODO 兑换记录
 * 
 *               All rights Reserved, Designed By ZTE-ITS
 * 
 *               Copyright: Copyright(C) 2010-2011
 * 
 *               Company 天成科技有限公司
 * 
 * @author: 李兴建
 * 
 * @version V1.0
 * 
 *          Createdate: 2012-7-30 下午09:14:43
 * 
 * 
 * 
 *          Modification History:
 * 
 *          Date Author Version Discription
 * 
 * 
 * 
 * 
 *          
 *          ----------------------------------------------------------------------
 *          -------------
 * 
 *          2012-7-30 李兴建 1.0 1.0
 * 
 *          Why & What is modified: <修改原因描述>
 */
@Entity
@Table(name = "financial_exchange_record")
public class BeanExchangeRecord extends BaseEntity {
	private static final long serialVersionUID = 6821848325373930231L;
	// 用户
	private BeanUser user;
	// 兑换日期
	private Timestamp dateTime;
	// 支付
	private Integer pay;
	
	private String payUnit;
	// 收入
	private Integer revenue;
	
	private String revenueUnit;
	// 状态 1:成功 2：失败
	private int state;
	
	@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "user_id")
	public BeanUser getUser() {
		return user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}

	public Timestamp getDateTime() {
		return dateTime;
	}

	public void setDateTime(Timestamp dateTime) {
		this.dateTime = dateTime;
	}

	public Integer getPay() {
		return pay;
	}

	public void setPay(Integer pay) {
		this.pay = pay;
	}

	public Integer getRevenue() {
		return revenue;
	}

	public void setRevenue(Integer revenue) {
		this.revenue = revenue;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getPayUnit() {
		return payUnit;
	}

	public void setPayUnit(String payUnit) {
		this.payUnit = payUnit;
	}

	public String getRevenueUnit() {
		return revenueUnit;
	}

	public void setRevenueUnit(String revenueUnit) {
		this.revenueUnit = revenueUnit;
	}

}
